package com.xpgk.mvc.ddc.query.fineQuery;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.alibaba.fastjson.JSON;
import com.xpgk.mvc.base.BaseController;
import com.xpgk.mvc.organization.Organization;
import com.xpgk.mvc.user.User;

public class FineQueryController extends BaseController{

	/**
	 * 罚款信息查询
	 */
	public void index(){
		User user = getCUser();
		setAttr("user", user);
		String ids = getCUserOrganIds();
		Organization organ = Organization.dao.findById(ids);
		Date date = new Date();
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
		SimpleDateFormat sdf2 = new SimpleDateFormat("dd");
		setAttr("year_month", sdf.format(date));
		setAttr("day", sdf2.format(date));
		setAttr("curOrgan", organ);
		render("fineQuery.html");
	}
	
	/**
	 * 罚款信息列表
	 */
	public void querylist(){
		String json = paging(splitPage, FineInfoQuerySQL.sqlId_splitPageSelect, FineInfoQuerySQL.sqlId_splitPageFrom);
		renderJson(json);
	}
	
}
